package com.ghck.server.utils;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;
import org.joda.time.DateTime;

public class JodaTimeUtil {
	
	public static boolean isSameDay(Date d1,Date d2){
		if(d1!=null && d2!=null){
			DateTime date1 = new DateTime(d1);
			DateTime date2 = new DateTime(d2);
			return StringUtils.equals(date1.toString("yyyy-MM-dd"), date2.toString("yyyy-MM-dd"));
		}
		return false;
	}

}
